import { ApproveState, ApproveLink } from '@/modules/flow/approve-flow-types'

export function getApproveFlow () {
  return Promise.resolve().then<{
  start: ApproveState
  states: Array<ApproveState>
  links: Array<ApproveLink>
  }>(() => {
    return {
      start: {
        key: 'start',
        label: 'start',
        type: 'start',
        x: 100,
        y: 120,
        approveType: 'start'
      },
      states: [
        {
          key: 'state1',
          label: 'state1',
          type: 'state',
          x: 240,
          y: 60,
          approveType: 'pass'
        },
        {
          key: 'state2',
          label: 'state2',
          type: 'state',
          x: 240,
          y: 180,
          approveType: 'must'
        }
      ],
      links: [
        {
          key: 'start-state1',
          label: 'start-state1',
          from: 'start',
          to: 'state1'
        }
      ]
    }
  })
}
